package com.heima.user.feign;

import com.heima.apis.user.IUserClient;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AuthDto;
import com.heima.user.service.ApUserRealnameService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserClient implements IUserClient {

    private final ApUserRealnameService realnameService;

    public UserClient(ApUserRealnameService realnameService) {
        this.realnameService = realnameService;
    }


    @PostMapping("/api/v1/auth/list")
    @Override
    public ResponseResult userScan(AuthDto dto) {
        return realnameService.userScan(dto);
    }


    @PostMapping("/api/v1/auth/authFail")
    @Override
    public ResponseResult failScan(AuthDto dto) {
        return realnameService.failScan(dto);
    }

    @PostMapping("/api/v1/auth/authPass")
    @Override
    public ResponseResult passScan(AuthDto dto) {
        return realnameService.passScan(dto);
    }
}
